import pymysql

db = pymysql.connect(host='localhost', user='bovink', passwd='123456', db='hbooker', charset='utf8')

cursor = db.cursor()

sql = """INSERT INTO hbooker.book(Title,Author,ClickTotal,ClickMonth,ClickWeek,RecommendTotal,RecommendMonth,RecommendWeek,MonthTicket,MonthTicketTotal,
Blade,BladeTotal,WordTotal) values ('fuck','测试作者','2','1','1','1','1','1','1','1','1','1','1')"""

try:
    # 执行sql语句
    cursor.execute(sql)
    db.commit()
except:
    print('hello')

db.close()
